﻿using AutoMapper;
using BPMN.Application.IService;
using BPMN.Domain.Entity.User;
using BPMN.DomianShare;
using Microsoft.AspNetCore.Mvc;
using BPMN.Application.Contracts.DTO.Request.Role;
using BPMN.Application.Contracts.DTO.Request.PerRole;
using BPMN.Application.Contracts.DTO.Response.RolePermission;
using BPMN.Application.Contracts.DTO.Response;
using BPMN.Application.Contracts.DTO.Request.Custom;

namespace BPMN.WebApi.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CustomController : ControllerBase
    {
        private readonly ICustomAppService custom;
        public CustomController(ICustomAppService custom)
        {
            this.custom = custom;
        }
        /// <summary>
        ///  角色添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<IActionResult> AddCustomInfo(CustomRequstDto entity)
        {
            return Ok(await custom.AddCustomInfo(entity));
        }
    }
}
